import 'package:flutter/material.dart';
import 'pages/posts_list_page.dart';
import 'pages/add_post_page.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: '帖子管理',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      initialRoute: '/',
      routes: {
        '/': (context) => const PostsListPage(),
        '/addPost': (context) => const AddPostPage(),
      },
      debugShowCheckedModeBanner: false,
    );
  }
}
